<template>
  <header class="nav-header">
    <div class="nav-search flex flex-between">
      <!-- 导航左侧 -->
      <div class="nav-search-left">
        <div class="nav-logo">
          <div class="nav-logo-bg"></div>
          <span>.ca</span>
        </div>
        <div class="flex nav-address">
          <span class="address-icon"></span>
          <div class="address-info">
            <span>Hello</span>
            <p>Select your address</p>
          </div>
        </div>
      </div>
      <!-- 搜索框 -->
      <div class="flex-1 flex search-box">
        <div class="search-select">
          <span>All</span>
          <i class="arrow-icon"></i>
        </div>
        <input class="flex-1" placeholder="Search Amazon.ca" />
        <div class="search-btn"></div>
      </div>
      <!-- 导航右侧 -->
      <div class="flex nav-right">
        <div class="country-box">
          <div style="height: 18px"></div>
          <div class="flex">
            <i class="country-icon"></i>
            <span>EN</span>
            <i class="arrow-icon"></i>
          </div>
        </div>
        <div class="nav-info-item">
          <span>Hello, zhangletong</span>
          <p>Account & Lists<i class="arrow-icon"></i></p>
        </div>
        <div class="nav-info-item">
          <span>Returns</span>
          <p>& Orders</p>
        </div>
        <div class="cart-box">
          <div class="cart-icon">
            <span>0</span>
          </div>
          <p>Cart</p>
        </div>
      </div>
    </div>
    <!-- 二级菜单 -->
    <div class="flex flex-between nav-second">
      <div class="flex menu-btn">
        <i></i>
        <span>All</span>
      </div>
      <ul class="flex flex-1 second-list">
        <li>Deals Store</li>
        <li>Buy Again</li>
        <li>Best Sellers</li>
        <li>Prime</li>
        <li>Gift Ideas</li>
        <li>Gift Cards</li>
        <li>New Releases</li>
        <li>Coupons</li>
        <li>Beauty & Personal Care</li>
        <li>Kindle Books</li>
        <li>Health & Household</li>
        <li>Home</li>
      </ul>
      <img src="@/assets/images/nav_second.jpg" />
    </div>
    <!-- 三级菜单 -->
    <div class="flex nav-third">
      <div class="third-tag">Today's Deals</div>
      <ul class="flex third-list">
        <li>Watched Deals</li>
        <li>Outlet Deals</li>
        <li>Warehouse Deals</li>
        <li>Coupons</li>
        <li>eBook Deals</li>
        <li>Subscribe & Save</li>
      </ul>
    </div>
  </header>
</template>

<style lang="less" scoped>
.nav-header {}
.nav-search {
  height: 60px;
  padding: 0 11px;
  color: #fff;
  background-color: #131921;

  .nav-search-left {
    height: 60px;
    display: flex;
  }

  .nav-logo {
    padding: 18px 9px 1px 7px;
    display: flex;

    span {
      margin-top: 4px;
      font-size: 14px;
      line-height: 1;
    }
  }

  .nav-logo-bg {
    width: 97px;
    height: 30px;
    background: url(../../../assets/images/amz_icons.png) no-repeat -10px -51px;
  }

  .nav-address {
    padding: 5px 11px;

    .address-icon {
      width: 15px;
      height: 18px;
      margin-top: 8px;
      background: url(../../../assets/images/amz_icons.png) no-repeat -71px -378px;
    }

    .address-info {
      padding-left: 3px;

      span {
        font-size: 12px;
        color: #ccc;
        line-height: 14px;
      }
      p {
        font-weight: 600;
        line-height: 16px;
      }
    }
  }

  .search-box {
    padding: 10px;

    .search-select {
      width: 50px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #555;
      border-radius: 4px 0 0 4px;
      border: 1px solid #f3f3f3;
      border-right-color: #cdcdcd;
      background-color: #f3f3f3;

      i {
        margin-left: 10px;
      }
    }

    input {
      box-sizing: border-box;
      height: 40px;
      padding: 7px 10px 10px 0;
      outline: none;
      border: 0;
      text-indent: 8px;
      font-size: 15px;
    }

    .search-btn {
      width: 45px;
      height: 40px;
      border-radius: 0 4px 4px 0;
      background: #febd69 url(../../../assets/images/amz_icons.png) no-repeat 2px -280px;
    }

  }

  .nav-right {
    height: 55px;
    padding-top: 5px;

    .country-box {
      height: 45px;
      padding-bottom: 5px;

      .country-icon {
        width: 24px;
        height: 18px;
        margin: 0 2px 1px 0;
        transform: scale(.9);
        background: url(../../../assets/images/countrys.png) no-repeat 0 -184px;
      }
      span {
        font-weight: 600;
      }
      .arrow-icon {
        margin-top: 6px;
        margin-left: 2px;
        border-top-color: #606060;
      }
    }

    .nav-info-item {
      height: 34px;
      padding: 9px 9px 10px 11px;

      span {
        font-size: 12px;
        line-height: 14px;
      }
      p {
        display: flex;
        font-weight: 600;
        line-height: 15px;

        i {
          margin-left: 2px;
          margin-bottom: 2px;
          align-self: flex-end;
        }
      }
    }
    .cart-box {
      position: relative;
      box-sizing: border-box;
      padding: 9px 9px 10px 11px;
      display: flex;
      font-weight: 600;

      .cart-icon {
        width: 38px;
        height: 26px;
        background: url(../../../assets/images/amz_icons.png) no-repeat -10px -340px;

        span {
          position: absolute;
          left: 28px;
          top: 8px;
          font-size: 16px;
          color: #f08804;
          font-weight: 600;
        }
      }

      p {
        align-self: flex-end;
      }
    }
  }

  .arrow-icon {
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-top-color: #666;
    border-bottom-width: 0;
  }
}
.nav-second {
  height: 39px;
  padding-left: 11px;
  position: relative;
  color: #fff;
  background-color: #232f3e;

  .menu-btn {
    padding: 8px 9px;
    cursor: pointer;

    i {
      width: 17px;
      height: 14px;
      background: url(../../../assets/images/amz_icons.png) no-repeat -172px -255px;
    }
    span {
      padding-left: 5px;
      font-weight: 600;
    }
  }

  .second-list {
    position: absolute;
    left: 70px;

    li {
      padding: 8px 9px;
      cursor: pointer;
    }
  }

  img {
    z-index: 1;
  }
}
.nav-third {
  height: 31px;
  padding-left: 15px;
  font-size: 12px;
  color: #333;
  border-top: 1px solid rgba(0, 0, 0, .17);
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  background-color: #fafafa;

  .third-tag {
    padding: 0 11px;
    font-weight: 600;
    cursor: pointer;
  }

  li {
    padding: 0 11px;
    cursor: pointer;
  }
}
</style>
